// import './assets/main.css'

import { createApp } from 'vue'
import { createPinia } from 'pinia'
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
import App from './App.vue'
import router from './router'
//引入初始化样式文件
import '@/styles/common.scss'
//引入自定义的懒加载全局指令
import { lazyPlugin } from '@/directives'
//引入全局插件
import { componentPlugin } from './components'

import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import VueCropper from "vue-cropperjs";
import "cropperjs";


const app = createApp(App)
let pinia = createPinia()
app.use(pinia)
pinia.use(piniaPluginPersistedstate)
app.use(router)
//注册懒加载全局指令
app.use(lazyPlugin)
app.use(VueCropper)
//注册全局插件
app.use(componentPlugin)
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}
app.mount('#app')



